function ngdomSpriteWeapon(owner, options) {
	ngdomSpriteWeapon.prototype.base.constructor.call(this, options);
	if (!this.engine) return;
	
	this.owner = owner;
	this.type = 'weapon';
	this.cssClass = 'weapon projectile';
	this.isRanged = true;
	this.firing = false;
	this.fired = 0;
	this.firedTime = 0;
	this.firingLength = 350;
	this.fireDelay = 0; //delay on first fire;
	this.reloadTime = 500;
	this.born = this.engine.tickCount;
	this.lifeTime = 1000;
	this.invincible = true;
	this.speed = 4;
	this.reverseOnCollision = false;
	this.spriteKey = 'weapon';
	this.spriteStates = false;
	this.spriteDirections = false;
	
	if (options) $.extend(true, this, options);
}
ngdomSpriteWeapon.inherits(ngdomSprite);
ngdomSpriteWeapon.prototype.fire = function () {
	this.firing = true;
	this.fired = 0;
	this.firedTime = this.engine.tickCount;
}
ngdomSpriteWeapon.prototype.loop = function () {
	if (this.engine.tickCount - this.firedTime - this.fireDelay - this.owner.aimDelay > this.firingLength) 
		this.firing = false;
		
	if (this.firing)
	{
		var firingIntervals = (this.engine.tickCount - this.firedTime - this.fireDelay - this.owner.aimDelay) / this.reloadTime;
		if (firingIntervals > this.fired)
		{
			var projectile = new this.constructor(this.owner);
			projectile.spriteKey = this.spriteKey;
			projectile.spriteExt = this.spriteExt;
			projectile.spriteStates = this.spriteStates;
			projectile.spriteDirections = this.spriteDirections;
			projectile.initSprites();
			projectile.position.x = this.owner.position.x;
			projectile.position.y = this.owner.position.y;
			projectile.direction = this.owner.direction;
			projectile.touchDamage = this.touchDamage;
			projectile.lifeTime = this.lifeTime;
			projectile.enterScene();
			this.engine.addProjectile(projectile);
			this.fired++;
		}
	}
}
ngdomSpriteWeapon.prototype.behave = function () {
	if (this.engine.tickCount - this.born > this.lifeTime) 
	{
		this.dead = true;
		this.el.remove();
	}
};
ngdomSpriteWeapon.prototype.collideWithWall = function () {
	this.dead = true;
	this.el.remove();
};
ngdomSpriteWeapon.prototype.collideWithPlayer = function () {
	if (this.owner == this.engine.player) return;
	if (this.engine.player.hasShield && !this.engine.player.attacking && this.engine.player.direction == this.oppositeDirection())
	{
		this.engine.sounds.play('block');
		this.reverseDirection();
		this.dying = true;
		this.dyingStartTime = this.engine.tickCount;
	}
	else
	{
		ngdomSpriteWeapon.prototype.base.collideWithPlayer.call(this);
		this.dead = true;
		this.el.hide();
	}
};